package br.edu.ufcg.splab.io;

import br.edu.ufcg.splab.core.InterfaceGraph;
import br.edu.ufcg.splab.generator.TestCaseGenerator;
import br.edu.ufcg.splab.generator.TestSuite;
import br.edu.ufcg.splab.parser.GraphToAnnotatedGraphParser;
import br.edu.ufcg.splab.util.Facade;
import br.edu.ufcg.splab.util.ReadTGF;

public class TestAnnotatedGraph {

	public static void main(String[] args) {
		try {
			ReadTGF parser = new ReadTGF();
			InterfaceGraph g = parser.getGraph("test-data\\input\\OneConditionBeginingOneEnd.tgf");
			
			GraphToAnnotatedGraphParser converter = new GraphToAnnotatedGraphParser();
			InterfaceGraph newG = converter.graphContraction(g);
			TestCaseGenerator generator = new TestCaseGenerator();
			TestSuite t = generator.generate(newG);
			System.out.println(t.toString());
			
			
			Facade facade = new Facade();
			facade.generateAnnotatedGraphFromTree("test-data\\input\\OneConditionBeginingOneEnd.tgf", 0, "test-data\\output\\AnnotatedPatricia.xml");
			
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}
	
}
